const articleFilterBody = (body) => {
  const { title, content } = body;
  return { title, content };
};
const categoryFilterBody = (body) => {
  const { name, rank } = body;
  return { name, rank };
};
const settingsFilterBody = (body) => {
  const { name, icp, copyright } = body;
  return { name, icp, copyright };
};
const usersFilterBody = (body) => {
  const { email, username, password, nickname, sex, company, introduce, role, avatar } = body;
  return {
    email,
    username,
    password,
    nickname,
    sex,
    company,
    introduce,
    role,
    avatar,
  };
};
const courseFilterBody = (body) => {
  const { categoryId, userId, name, image, recommended, introductory, content, free } = body;
  return {
    categoryId,
    userId,
    name,
    image,
    recommended,
    introductory,
    content,
    free,
  };
};
const chaptersFilterBody = (body) => {
  const { courseId, title, content, video, rank, free } = body;
  return { courseId, title, content, video, rank, free };
};
module.exports = {
  articleFilterBody,
  categoryFilterBody,
  settingsFilterBody,
  usersFilterBody,
  courseFilterBody,
  chaptersFilterBody,
};
